

-- 1 每日经营概况
sqoop export \
--connect 'jdbc:mysql://node101:3306/jtp_dindon_3?useUnicode=true&characterEncoding=utf-8' \
--username root \
--password 123456 \
--export-dir 'hdfs://node101:8020/cai/jjb1' \
--num-mappers 1 \
--table lv1 \
--update-mode allowinsert \
--input-fields-terminated-by '\001' \
--input-null-non-string '\\N' \
--input-null-string '\\N'


-- 2 用户留存分析
sqoop export \
--connect 'jdbc:mysql://node101:3306/jtp_dindon_3?useUnicode=true&characterEncoding=utf-8' \
--username root \
--password 123456 \
--export-dir 'hdfs://node101:8020/cai/jjb2' \
--num-mappers 1 \
--table lv2 \
--update-mode allowinsert \
--input-fields-terminated-by '\001' \
--input-null-non-string '\\N' \
--input-null-string '\\N'


-- 3 商品销售分析-商品top20
sqoop export \
--connect 'jdbc:mysql://node101:3306/jtp_dindon_3?useUnicode=true&characterEncoding=utf-8' \
--username root \
--password 123456 \
--export-dir 'hdfs://node101:8020/cai/jjb3_1' \
--num-mappers 1 \
--table lv3 \
--update-mode allowinsert \
--input-fields-terminated-by '\001' \
--input-null-non-string '\\N' \
--input-null-string '\\N'


-- 4 商品销售分析-品类销售分析
sqoop export \
--connect 'jdbc:mysql://node101:3306/jtp_dindon_3?useUnicode=true&characterEncoding=utf-8' \
--username root \
--password 123456 \
--export-dir 'hdfs://node101:8020/cai/jjb3_2' \
--num-mappers 1 \
--table lv4 \
--update-mode allowinsert \
--input-fields-terminated-by '\001' \
--input-null-non-string '\\N' \
--input-null-string '\\N'


-- 5 漏斗分析
sqoop export \
--connect 'jdbc:mysql://node101:3306/jtp_dindon_3?useUnicode=true&characterEncoding=utf-8' \
--username root \
--password 123456 \
--export-dir 'hdfs://node101:8020/cai/jjb4' \
--num-mappers 1 \
--table lv5 \
--update-mode allowinsert \
--input-fields-terminated-by '\001' \
--input-null-non-string '\\N' \
--input-null-string '\\N'


-- 6 配送时效分析
sqoop export \
--connect 'jdbc:mysql://node101:3306/jtp_dindon_3?useUnicode=true&characterEncoding=utf-8' \
--username root \
--password 123456 \
--export-dir 'hdfs://node101:8020/cai/jjb5' \
--num-mappers 1 \
--table lv6 \
--update-mode allowinsert \
--input-fields-terminated-by '\001' \
--input-null-non-string '\\N' \
--input-null-string '\\N'


-- 7 会员价值分析
sqoop export \
--connect 'jdbc:mysql://node101:3306/jtp_dindon_3?useUnicode=true&characterEncoding=utf-8' \
--username root \
--password 123456 \
--export-dir 'hdfs://node101:8020/cai/jjb6' \
--num-mappers 1 \
--table lv7 \
--update-mode allowinsert \
--input-fields-terminated-by '\001' \
--input-null-non-string '\\N' \
--input-null-string '\\N'


